<script language="javascript"> 
<!--
/*屏蔽所有的js错误*/
function killerrors() { 
return true; 
} 
window.onerror = killerrors; 
//-->
</script>
<script type="text/javascript">
var process_request = "<?php echo $this->_var['lang']['process_request']; ?>";
var btn_buy = "<?php echo $this->_var['lang']['btn_buy']; ?>";
var is_cancel = "<?php echo $this->_var['lang']['is_cancel']; ?>";
var select_spe = "<?php echo $this->_var['lang']['select_spe']; ?>";
</script>

<script>
function ask(txt) {
return window.confirm(txt);
}
function bookmark(){
if(ask("要将本站点加入收藏夹吗？")) {
  var title = document.title
  var domain = window.location.hostname;
  var url = window.location.href;
  if( document.all ) { // ie
   window.external.AddFavorite(url, title);
  } else if (window.sidebar) { // firefox
   window.sidebar.addPanel(title, url, title);
  }
}
}

</script>
<?php
function get_subcate_byurl($url)
{
	$rs = strpos($url,"category");
	if($rs!==false)
	{
		preg_match("/\d+/i",$url,$matches);
		$cid = $matches[0];
		$cat_arr = array();
		$sql = "select * from ".$GLOBALS['ecs']->table('category')." where parent_id=".$cid." and is_show=1 ORDER BY sort_order ASC, cat_id ASC";
		$res = $GLOBALS['db']->getAll($sql);
		
		foreach($res as $idx => $row)
		{
			$cat_arr[$idx]['id']   = $row['cat_id'];
            $cat_arr[$idx]['name'] = $row['cat_name'];
            $cat_arr[$idx]['url']  = build_uri('category', array('cid' => $row['cat_id']), $row['cat_name']);
			$cat_arr[$idx]['children'] = get_clild_list($row['cat_id']);
		}

		return $cat_arr;
	}
	else 
	{
		return false;
	}
}

function get_clild_list($pid)
{
    $sql_sub = "select * from ".$GLOBALS['ecs']->table('category')." where parent_id=".$pid." and is_show=1 ORDER BY sort_order ASC, cat_id ASC";

	$subres = $GLOBALS['db']->getAll($sql_sub);
	if($subres)
	{
		foreach ($subres as $sidx => $subrow)
		{
			$children[$sidx]['id']=$subrow['cat_id'];
			$children[$sidx]['name']=$subrow['cat_name'];
			$children[$sidx]['url']=build_uri('category', array('cid' => $subrow['cat_id']), $subrow['cat_name']);
		}
	}
	else 
	{
		$children = null;
	}
			
	return $children;
}
?>

<script type="text/javascript">
      //初始化主菜单
		function sw_nav(obj,tag)
		{

			var subdivs = obj.getElementsByTagName("ul");
			var subiframes = obj.getElementsByTagName("iframe");
			
			if(subdivs.length>0)
			{

				if(tag==1)
				{
					subdivs[0].style.display = "block";
					subiframes[0].style.display = "block";
					
				}
				else
				{
					subdivs[0].style.display = "none";
					subiframes[0].style.display = "none";
				}
				
			}
		}
      </script>
   <script type="text/javascript">
    
    <!--
    function checkSearchForm()
    {
        if(document.getElementById('keyword').value != '请输入搜索关键词' || document.getElementById('keyword').value=="")
        {
            return true;
        }
        else
        {
            alert("<?php echo $this->_var['lang']['no_keywords']; ?>");
            return false;
        }
    }
    -->
    
    </script>

<div class="bodydiv" >
	<DIV class="top">
        <DIV class="logo">
        <A href="./index.php"><IMG alt="别墅图纸超市" src="themes/68ecshop_moban_zhongliang/images/logo.gif" width="195" height="50"></A>
        </DIV>
        <DIV class="topad"><IMG src="themes/68ecshop_moban_zhongliang/images/ad1.jpg"  width="468" height="60"></DIV>
        <DIV class="top_r">
           <p  style="text-align: right;">
           <?php echo $this->smarty_insert_scripts(array('files'=>'transport.js,utils.js')); ?> <font id="ECS_MEMBERZONE"><?php 
$k = array (
  'name' => 'member_info',
);
echo $this->_echash . $k['name'] . '|' . serialize($k) . $this->_echash;
?> </font>
           </p>
           <p  style="text-align: right;">
              <?php if ($this->_var['navigator_list']['top']): ?>
              <?php $_from = $this->_var['navigator_list']['top']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'nav');$this->_foreach['nav_top_list'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['nav_top_list']['total'] > 0):
    foreach ($_from AS $this->_var['nav']):
        $this->_foreach['nav_top_list']['iteration']++;
?>
			   <a href="<?php echo $this->_var['nav']['url']; ?>" 
                <?php if ($this->_var['nav']['opennew'] == 1): ?>
                target="_blank"
                <?php endif; ?> ><?php echo $this->_var['nav']['name']; ?></a>
              &nbsp;|
              <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
              <?php endif; ?>
              <a onclick=bookmark(); href="javascript: void 0;">收藏本站</a>
           </p>
           <P class="zxdh"><IMG src="themes/68ecshop_moban_zhongliang/images/zxdh.gif"></P>
        </DIV>
    </DIV>


<DIV class="nav" >
<DIV class="nav_l"></DIV>
<DIV class="nav_r"></DIV>
	<DIV class="nav_m"  style="background-image:url(themes/68ecshop_moban_zhongliang/images/nav_bg.gif);">
        <UL>
          <li ><a href="index.php"><?php echo $this->_var['lang']['home']; ?><span></span></a></li>
          <?php $_from = $this->_var['navigator_list']['middle']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'nav');$this->_foreach['nav_middle_list'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['nav_middle_list']['total'] > 0):
    foreach ($_from AS $this->_var['nav']):
        $this->_foreach['nav_middle_list']['iteration']++;
?>
          <li ><a href="<?php echo $this->_var['nav']['url']; ?>" <?php if ($this->_var['nav']['opennew'] == 1): ?>target="_blank" <?php endif; ?> ><?php echo $this->_var['nav']['name']; ?><span></span></a></li>
          <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
        </UL>
    </DIV>  
    
    <DIV class="gwc">
		<SPAN>
        	<a rel="nofollow" href="flow.php" id="hd_cart1">购物车<?php 
$k = array (
  'name' => 'cart_info',
);
echo $this->_echash . $k['name'] . '|' . serialize($k) . $this->_echash;
?>件</a>
		</SPAN>
	</DIV>
     <script type="text/javascript">
      //初始化主菜单
		function sw_nav(obj,tag)
		{

			var subdivs = obj.getElementsByTagName("ul");
			var subiframes = obj.getElementsByTagName("iframe");
			
			if(subdivs.length>0)
			{

				if(tag==1)
				{
					subdivs[0].style.display = "block";
					subiframes[0].style.display = "block";
					
				}
				else
				{
					subdivs[0].style.display = "none";
					subiframes[0].style.display = "none";
				}
				
			}
		}
      </script>
</DIV>


<!---
<div id="ec68-header" >
  <div class="ec68-clear"></div>
  <div id="ec68-search-part" >
    <div id="ec68-search">
      <div>
        <div id="jgsss_1" class="jgsss_1">
          <div >
            <div id="csearch">
              <form id="searchForm" name="searchForm" method="get" action="search.php" onSubmit="return checkSearchForm()">
                <table border="0" cellspacing="0" cellpadding="0" height="30">
                  <tr>
                    <td valign="top"><input style="width:220px;" type="text" id="keyword" name="keywords" border="0" class="searchputt" value="请输入搜索关键词" onfocus="if (value =='请输入搜索关键词'){value =''}" onblur="if (value ==''){value='请输入搜索关键词'}"/></td>
                    <td valign="top">
                      <input type="submit" class="searchbutt" value="搜索"/></td>
                    <td width="10">&nbsp;</td>
                    <td style="line-height:30px;"><a href="search.php?act=advanced_search" >高级搜索</a></td>
                    <td width="20">&nbsp;</td>
                    <td style="line-height:30px;"><span style="color:#fff;">热搜：</span> <span>
                      <?php if ($this->_var['searchkeywords']): ?>
   <?php $_from = $this->_var['searchkeywords']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'val');if (count($_from)):
    foreach ($_from AS $this->_var['val']):
?>
   <a href="search.php?keywords=<?php echo urlencode($this->_var['val']); ?>"><?php echo $this->_var['val']; ?></a>&nbsp;&nbsp;
   <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
   <?php endif; ?>
                     
                     </span></td>
                  </tr>
                </table>
              </form>
            </div>
          </div>
        </div>

      </div>
    </div>
    
  </div>
</div>
--->
</div>